#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "ExecutionSpecification.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Action;

/// <summary>
/// ActionExecutionSpecification
/// An ActionExecutionSpecification is a kind of ExecutionSpecification representing
/// the execution of an Action.
/// </summary>
class UMLMODEL_EXPORT ActionExecutionSpecification : public ExecutionSpecification {

public: // Constructors and destructors
    explicit ActionExecutionSpecification(const QString& umlType="uml::ActionExecutionSpecification");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// action getter
    /// Action whose execution is occurring.
    /// </summary>
    shared_ptr<Action> action() const;

    /// <summary>
    /// action setter
    /// Action whose execution is occurring.
    /// </summary>
    void setAction(shared_ptr<Action> value);

private: // Fields
    /// <summary>
    /// action
    /// Action whose execution is occurring.
    /// </summary>
    shared_ptr<Action> action_;

};

} // namespace uml
